#拷贝内容
'''f1 = open('hua',encoding ='utf-8' )
f2 = open('hua1','w',encoding='utf-8')
shutil.copyfileobj(f1,f2)
f1.close()
f2.close()
'''

# shutil.copyfile('hua1','hua2')#和上面一样


#shutil.copymode(src,dst)仅仅拷贝权限，内容，组，用户均不变
# shutil.copystat('hua','hua1')#拷贝状态的信息
# shutil.copy()#拷贝文件和权限
# shutil.copy2()#拷贝文件和状态信息

#当前模块和要复制的目录在同一级目录下   shutil.copytree('cp','newcp')
#shutil.rmtree('newcp')

# shutil.move()#递归的移动文件

# shutil.make_archive('shutil_test','zip',r'D:\老男孩\test')#创建压缩包并返回文件路径

'''
import zipfile  
#压缩 
z = zipfile.ZipFile('test.zip','w')
z.write("11111.py")
print('------')
z.write('22')

#解压
z = zipfile.ZipFile('test.zip','r')
z.extractall()
z.close()
'''












